import 'dart:io';

import 'package:flutter/foundation.dart';

/// @description: 网络请求接口相关
/// @author tangzhentao
/// @created at 19:34 2024/12/31

class Apis {
  static const _baseTestUrl = 'https://api.xianfengjin.com/api/';
  static const _baseProductionUrl = 'https://api.xianfengjin.com/api/';

  static const imageBaseUrl = 'https://api.xianfengjin.com/';

  static const baseurl = kReleaseMode ? _baseProductionUrl:_baseTestUrl;

  /// 获取配置项 POST
  ///
  /// key [String]
  ///
  /// 黄金回收保证金比例（%）→ collateral_rate
  ///
  /// 平台服务协议 → service_agreement
  ///
  /// 我的店铺规则 → store_rules
  ///
  /// 我要开店规则 → open_store_rules
  ///
  /// 积分规则说明 → points_rules
  ///
  /// 实名认证协议 → real_name_authentication
  ///
  /// 购买黄金制品协议 → gold_purchase_agreement
  static const config = 'config';

  /// 上传文件 POST
  ///
  /// FormData {
  ///
  /// file [File]待上传文件
  ///
  /// }
  static const upload = 'upload';

  /// 实时金价 POST
  ///
  /// Body {
  ///
  /// goldid [String] 查询品种，多个用逗号隔开(1051,1052,1053,1054),包含:
  /// 1051:黄金T+D
  /// 1052:白银T+D
  /// 1053:黄金9999
  /// 1054:黄金9995
  /// 1056:铂金9995
  /// 1058:金条100g
  /// 1059:黄金T+N1
  /// 1060:黄金T+N2
  ///
  /// }
  static const goldPrice = 'goldPrice';

  /// 查快递公司 POST
  ///
  /// body {
  ///
  /// page [int] 页码
  ///
  /// expName [String] 搜索关键字
  ///
  /// }
  static const expressCompany = 'expressCompany';
}
